#ifndef SCENARIU_H_
#define SCENARIU_H_
#ifndef GLOBAL_H
#define GLOBAL_H
extern int WIDTH;
extern int HEIGHT;
extern int winIdMain;
extern int winIdSub;
extern int current_scene;
extern char lastbutton[40];
extern bool button_changed;
extern void process_button_and_make_changes();
#endif
#include <vector>
#include <stdarg.h>
#include "Meniu.h"
#include "Obiect3D.h"
#include "Obiect2D.h"
#include "Plan.h"
#include "Camera.h"
#include "Light.h"

using namespace std;

struct Soarec {
	GLdouble x_mouse,xp_mouse;
	GLdouble y_mouse,yp_mouse;
	bool right_pressed,left_pressed,middle_pressed;
};

struct Text {
	Text() : Visible(true) {};
	char comm[10];
	char str[40];
	float x;
	float y;
	float culoare[3];
	bool Visible;
	int type; //0 - in subwindow big, 1-in subwindow small , 2 -in main small -orto , 3 in main big 
};
enum Tip_ceata {LINIAR = 0,EXP,EXP2} ;
struct Fog {
	Tip_ceata type;
	float nearl;
	float farl;
	float dens;
	float culoare[4];
};

class Scenariu 
{
public:

	Meniu *M;
	vector<Obiect3D *> objects3D;
	vector<Obiect2D *> objects2D;
	vector<Plan *> plans;
	vector<Text> texte;
	Camera *c;
	Camera *custom_cam;
	Fog ceata;
	bool use_custom;
	bool custom_orto;
	vector<Light *> lights;
	Soarec MySoarec;
	float subheight;
	int projection; // 0 - orto , 1 - perspective+ camera
	float proj_args[6];
	int selected;
	float use_fog;
	Scenariu(void);
	void InitMenu(Meniu *);
	void init(void);
	void Draw2D(void);
	void Draw3D(void);
	void mainDisplay (void);
	void subDisplay (void);
	void mainReshape (int , int );
	void subReshape (int , int );
	void TransformToWorldCoords(GLdouble , GLdouble , GLdouble *,GLdouble *);
	void keyboard (unsigned char , int , int );
	void mainMenu(int );
	void subMenu(int );
	void MouseButton(int ,int ,int , int );
	void MouseMotion(int , int );
	void MousePassiveMotion(int , int );
	void drawString (char *,GLfloat,GLfloat);
	void drawStringBig (char *);
	void drawStringSmall (char *);
	void drawStringMedium (char *); 
	void SetSubHeight(float);
	~Scenariu(void);
};

#endif